home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UTIL / PROGRAMMING / TORNADO / Info < prev    next >
Text File  |  1995-05-25  |  14KB  |  235 lines

  1. Introduction to the Tornado application standard:
  2.  
  3.  - a proposed method of making writing Wimp apps like riding! (but what!) :-)
  4.  
  5. by N. Douglas
  6.  
  7. In a nutshell, Tornado can be described as 'a Filecore for Wimp apps'. It is
  8. designed to force a standard look onto Wimp apps, while simultaneously making
  9. writing easy, and enhancing life for the user.
  10.    It is a development of RISC-OS that has long been coming, but something
  11. Acorn aren't too keen on changing. They prefer developing their precious
  12. SharedCLibrary, while ignoring the greater good of developing RISC-OS.
  13.    Tornado will also function as a library, a filing system, and general
  14. support. It is intended, that if it ever gets finished, it will form a large
  15. part of RISC-OS's to come, whether Acorn likes it or not.
  16.    <Rousing statement>: Tornado will allow the RISC-OS platform to once again
  17. assume the cutting edge of OS technology, showing what a _real_ OS can do.
  18. Forget Windows '95, forget X. Tornado, when finished, will increase user
  19. productivity to an extent that *the* techie platform will only be the Acorn
  20. one.
  21.    Ok, whether you believe that or not, keep reading. I think you'll find
  22. many of the features described here exciting, if nothing else.
  23.  
  24.    This document intends to describe what this is all about, and to drum up
  25. both support and writers. Anyone can join in, and write for Tornado. Right
  26. now, we need coders for Part A, the support backbone. They have to be pretty
  27. compentent in Assembler, as the vast majority of this section will be in
  28. assembler. Some parts may be in C (without ANSI libs), but little in Basic.
  29. The end product will consist entirely of C or Assembler, with no Basic
  30. (unless someone finishes the BasicSWI coding!).
  31.  
  32. Part A: Support
  33.    In this branch are the low-level facilities provided by Tornado. Upon
  34. these facilities the rest of the standard hinges. It consists of the
  35. following:
  36.    *  Heap+: This is an extension to the OS_Heap standard, remaining backward
  37. compatible with OS_Heap style heaps, but adding the important element of
  38. relocatable blocks and automatic garbage collection. Tasks claiming blocks
  39. can choose either (a) fixed blocks or (b) shifting blocks. Type a are given
  40. handles pointing to their position, ala OS_Heap style. Type b are given
  41. negative handles, and before each access a Tornado_Heap+ SWI must be called
  42. to retrieve the address of this block. Any data within this block _must_ be
  43. relocatable at all times. Anyone wishing to see in more detail this heap
  44. format, see the Basic test program HeapExt.
  45.    *  TornFS: This is a r/w filing sytem holding its data in RMA. Every
  46. Tornado task, after calling Tornado_Initialise gets an account in here, and
  47. all files/Heap+ blocks have associated filenames in the accounts. IE; when a
  48. app claims a block, a new file is created in tfs:, although the actual data
  49. within the file is actually stored in a heap+ after the main code of the
  50. task. All filing system operations can be done on this file (and the block)
  51. as usual, as the data is accessed using Wimp_TransferBlock (which means
  52. we'll be needing tfs: as a module task). Odd? You'll see why it's so
  53. advantageous later.
  54.    *  Wimp and misc utils: These include little things that always prove
  55. themselves really vital. These routines could possibly be in C.
  56.    Ok, for a start programmers are needed for:
  57.       Preemption: Done, but needs tiding up, and extending so it stores the
  58. codes it receives, and can regurgitate them later.
  59.       General Wimp utils, like that supplied with DeskLib: These need to be
  60. recompiled into module format, and accessed through a SWI interface.
  61.       Accessory sub-tasks: Ah, this is interesting. The idea is this: a task
  62. wanting to do some heavy processing, schedules a subtask. This subtask is a
  63. program in its own right, a 'black box' if you like. It takes in data, and
  64. spits out data. Here's how it works:
  65.          Tornado task calls Tornado_StartAccessoryTask, pointing to the input
  66. data and output data (in tfs:). The task called is an actual program, and it
  67. will be called using *Run <taskpath&name> %0 %1 %2 etc. The program may
  68. reside in the home dir of the task, or if frequently used (option in option
  69. window) could reside in tfs:.
  70.          Now, what happens is this: If there is only one processor available,
  71. the subtask is run. The subtask calls Tornado_InitialiseSubTask, which in
  72. this case starts the task up as a wimp app, and starts preemption too. The
  73. subtask runs along, does its stuff, and exits with Tornado_ClosedownSubTask,
  74. with the data processed. The subtask is exited, and the originator task is
  75. told the data is finished.
  76.          Second processor: The subtask code, and its data in/out, are copied
  77. to the 2nd processor's memory, where a Tornado subtask server is running.
  78. Same as above, except maybe without the Wimp getting involved and instead
  79. preemption between multiple tasks occuring, ala VAX VMS style. Finishes as
  80. above, except the results are copied back.
  81.          Remote processor: this could be on the Internet, or on an Ethernet.
  82. The subtask & data is copied over the network(s), to a server running on the
  83. remote machine. As above, is copied back.
  84.          A lot of work, but for now we only need the local processor option.
  85. Not too difficult.
  86.       Internal sub-tasks: a piece of code is called on every poll, and this
  87. does the required job in bits. This may detract from the processor time the
  88. task receives, or maybe not.
  89.       Load/save routines which work under interrupts: Done, but need tidying,
  90. and I'm not happy enough yet. The code should be able to intelligently guess
  91. the ratios required for optimum access depending on the media being accessed.
  92. We'll need a list of access speeds and transfer speeds to do this properly.
  93.       Processor priority program: I think this can be done by having Tornado
  94. send a Wimp_SendMessage no. 0 on every poll. This would double the processor
  95. time the task gets. Or triple, quadrouple, etc.
  96.  
  97. Ok, this is the really dreary bit. Hard work, little gain. Anyone doing work
  98. here can release the code seperately as a stand-alone version too, if they so
  99. wish. But please read the Readme file first.
  100.  
  101.  
  102. Part B: Tying it all together
  103.    Okay, now we start having fun. With the foundations laid, the real fun
  104. stuff starts. It's also probably the hardest and longest bit here, and will
  105. take months of coding. Here is the major preliminary stuff, blow by blow:
  106.    *  Automatic loading: Essentially, a user drags a file (either from filer
  107. or another app) onto something belonging to the task. Tornado loads/transfers
  108. the file into tfs: (multitaskingly if necessary, like it's a slow medium or
  109. a network).
  110.          NOTE: If the file format loaded in isn't a one the app can handle
  111. (eg; loaded=GIF, task can only take Sprite), Tornado may first translate the
  112. file into one the task can understand.
  113.          When finished, Tornado sends a Tornado_Poll message to the app,
  114. indicating which window etc. The task then allocates its own block (which
  115. also appears in tfs:), and copies/loads the file into it. The task recalls
  116. Tornado_Poll, whereupon the original is deleted.
  117.          OR: The task can ask for the block to be preserved, and schedule
  118. either (a) an external subtask to do the processing or (b) an internal
  119. one. Or, if it's lazy, it can ask for preemption on its code (not approved
  120. though!)
  121.    *  Automatic saving: You can guess it from the above.
  122.    *  Automatic OLE: Picture a nice Draw file in a Tornado DTP package. It
  123. sits in its frame, beautifully. Then, the user double clicks on it while
  124. holding down Shift (ala Filer=>Edit style), having noticed it's OLEable
  125. because the pointer changed when it moved over it, and when the user pressed
  126. Shift a double-click pointer came up etc. etc. Tornado gets the OLE request.
  127. It then (optional) returns via Tornado_Poll, asking for preparations. Then it
  128. copies the file out of the tasks heap+, into a tfs: OLE file. This is
  129. DataOpened. Draw, currently loaded (or if not, Alias$RunTypeXXX is done),
  130. picks it up and loads it. User edits. User opens Draw's save dialogue, clicks
  131. on OK. File is saved back to tfs:, where Tornado notices the changed
  132. filestamp, and recopies it back into the task's original block, extending it
  133. if necessary (OR sends a Tornado_Poll and asks the task to do it).
  134.         Obviously the task must firstly store that sprite in its own block,
  135. and indicate that it's OLEable. This is done via Template files and the
  136. indirection attached to each icon. This hasn't been defined yet, but further
  137. details are available on request.
  138.    *  Automatic hotlinking: Not only is every Tornado application hotlinked
  139. to the Tornado application manager (more later), but files out of one
  140. application can also be hotlinked to another. Consider it a new view of one
  141. file in a task put into another task. This allows a spreadsheet's data to be
  142. graphed by a seperate app, without extra propriatary code. Also, any graph
  143. package can be used, not just one.
  144.    *  Tornado application manager: This is a centralised manager, which
  145. essentially replaces the Task Manager. It will offer various graphs of task
  146. memory and resource usage, how much processor time each task is getting etc.
  147. etc. It will also allow the user low-level control over each app, whether it
  148. be directly tweaking files, shifting data around, sending test messages etc.
  149. The Tornado application manager will be the friendly frond-end of the Tornado
  150. resources, and will extend RISC-OS to the extent that it will once again
  151. become the cutting edge of OS technology, like RISC-OS 2 was in its heyday.
  152.          It will also allow global options to be set, like all Tornado apps
  153. should use outline fonts, all should preempt operations etc.
  154.    *  Smaller, not so major things. For example, the standard Tornado app
  155. option window will have a pane updated exclusively by Tornado, and will be
  156. common to all apps. All icons will automatically have 3d borders, slabbing
  157. icons, changing mouse pointers etc. Automatic interactive help, although it's
  158. use shouldn't be necessary if the task is done right, it may be useful for
  159. larger apps. Proper error windows, which don't hold up the machine, and
  160. display more meaningful messages, and will tell you to RTFM if you ask! :-).
  161. Rendering SWI's to draw Draw files, text files, sprites - all major file
  162. formats, and all automatically if so wanted.
  163.          A standard method of communicating between tasks, so that things
  164. like eg; in the DTP you say this pane should contain the address of one Niall
  165. Douglas, it broadcasts the request, and waits for a reply (ie; polling
  166. doesn't stop). A database picks up the request (because Tornado would have
  167. routed the request to databases only, and if one wasn't loaded it would load
  168. one in), searches all the files it has loaded (if it can't find any,
  169. depending on user choice, it may then start searching the hard disc and/or
  170. attached networks, looking for and searching any files it finds that are of
  171. it's filetype), and if it finds such an entry (or if more it pops up a
  172. dialogue window) it then inserts the data.
  173.          Obviously, this is quite a fair bit away. But, the point is, the
  174. framework should be laid as so to make this possible at a later date.
  175.  
  176.  
  177. Above all, the design of Tornado is to increase productivity, although at
  178. initial programmer expense, the result will be a fast, responsive,
  179. and above all a productive machine. If it works, it shall be seen how this
  180. will improve life for Acorn's everywhere. Later, it should be possible to
  181. implement a 'Tornado stamp of approval', whereby commercial vendors wanting
  182. to ensure their customers know their product is good, will apply for
  183. approval (of course for a suitable fee), whereupon a Tornado member will
  184. review the product, decide whether is passes or not, what faults it has, and
  185. will then reply the findings to the vendor. This way, Acorn users will /know/
  186. if a commercial product is as good as it is hyped. No AU to mislead us! :-)
  187.  
  188. Well, that's it. Some data is included in this archive, and it is subject to
  189. the restrictions in 'Readme'. Any questions, ideas, or complaints! to
  190. Niall Douglas@fidonet#2:257/501.13, or ndouglas@digibank.demon.co.uk.
  191.  
  192. Cheers,
  193.       _
  194. |\ | | \ 
  195. | \|.|_/.
  196.  
  197.  
  198.  
  199. Already defined structures (not fixed!):
  200.  
  201. Structure of tfs:
  202. $.[Internal]        - always present
  203. $.<appname>        - dir, containing the account of the task
  204. $.<appname>.[Data]    - contains data about app, as held by Tornado. Eg;
  205. task handle, what things it wants automated, etc.
  206. $.<appname>.<filename>     - dir, containing data for that particular loaded
  207. file.
  208. $...<filename>.Master    - contains main data of that file
  209. $...<filename>.SubfileX    - contains a subfile, like the above sprite in a DTP
  210. frame.
  211. $.<appname>.Claims    - dir, containing any Tornado_Heap+ misc claims, ie;
  212. those not directly related to files.
  213. $...Claims.<descript>    - a particular claimed block. BTW, the <descript>
  214. comes from a descriptor string passed to Tornado_Heap+ [Claim block]. It can
  215. be as awful as '0', or something better like 'pollingblk'
  216. $.<appname>.OLE        - dir, containing files currently being edited under
  217. OLE.
  218.  
  219. [Internal] file:     (each rec 64 bytes)
  220. +00:ptr to full app name, as passed to the Task manager
  221. +04:ptr to list of filetypes the app can load. Important, as if the app can
  222. only load sprites, and a GIF file is dragged to it, Tornado may be able to
  223. ask another loaded task to translate (eg; ChangeFSI).
  224. +08:ptr to list of filetypes the app can save. This may be augmented by
  225. Tornado if something like ChangeFSI is loaded. Eg; if it can save sprites, it
  226. can also save GIF's, TIFF's etc.
  227. +12:task handle
  228. +16:flags
  229. +20:more flags
  230. +24:still more flags
  231. +28 to +60:reserved
  232.  
  233. [Data] file: not defined yet.
  234.  
  235.